﻿namespace HttpClientStudy.Config
{
    public class WebApiConfig
    {
        /// <summary>
        /// 主机
        /// </summary>
        public string Host { get; set; } = "localhost";

        /// <summary>
        /// 端口
        /// </summary>
        public int Port { get; set; } = 5189;

        /// <summary>
        /// 协议(http 或者 https)
        /// </summary>
        public string Scheme { get; set; } = "http";

        /// <summary>
        /// 基本路径,不以/结尾
        /// </summary>
        public string PathBase { get; set; } = string.Empty;
        
        /// <summary>
        /// 
        /// </summary>
        public string BaseUrl 
        {
            get { return $"{Scheme}://{Host}:{Port}"; }
        }

        /// <summary>
        /// WebApi 互斥量
        /// </summary>
        public string WebAppMutexName { get; set; } = "HttpClientStudy.WebApp";
    }
}
